package com.fz.us.oa.core.entity.com;

import com.fz.us.admin.company.entity.BaseFlowEntity;
import com.fz.us.oa.core.entity.common.FileManage;

import javax.persistence.*;
import java.util.Date;
import java.util.List;

/**
 * Created by dzw on 2017/12/1.
 * 业务洽谈登记
 */
@Entity
@Table(name="ec_businesstalk")
public class BusinessTalk extends BaseFlowEntity {
    private static final long serialVersionUID = 882244138909573376L;

    /**
     * 客户信息表
     */
    private CustomerInfo customerInfo;
    /**
     * 开始时间
     */
    private Date startDate;
    /**
     * 结束时间
     */
    private Date endDate;
    /**
     * 洽谈主题
     */
    private String talkTopic;
    /**
     * 洽谈方式
     */
    private String talkType;
    /**
     * 洽谈地址
     */
    private String talkAddress;
    /**
     * 洽谈对象
     */
    private String talkObject;
    /**
     * 洽谈内容
     */
    private String talkContent;
    /**
     * 洽谈内容附件
     */
    private List<FileManage> talkFile;
    /**
     * 参与人员
     */
    private String joinMember;

    @ManyToOne(fetch = FetchType.LAZY)
    public CustomerInfo getCustomerInfo() {
        return customerInfo;
    }

    public void setCustomerInfo(CustomerInfo customerInfo) {
        this.customerInfo = customerInfo;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public String getTalkTopic() {
        return talkTopic;
    }

    public void setTalkTopic(String talkTopic) {
        this.talkTopic = talkTopic;
    }

    public String getTalkType() {
        return talkType;
    }

    public void setTalkType(String talkType) {
        this.talkType = talkType;
    }

    public String getTalkAddress() {
        return talkAddress;
    }

    public void setTalkAddress(String talkAddress) {
        this.talkAddress = talkAddress;
    }

    public String getTalkObject() {
        return talkObject;
    }

    public void setTalkObject(String talkObject) {
        this.talkObject = talkObject;
    }

    public String getTalkContent() {
        return talkContent;
    }

    public void setTalkContent(String talkContent) {
        this.talkContent = talkContent;
    }

    @ManyToMany(fetch = FetchType.LAZY)
    @JoinTable(name = "ec_businessTalk_file", joinColumns = @JoinColumn(name="id"),inverseJoinColumns = @JoinColumn(name="fileId"))
    public List<FileManage> getTalkFile() {
        return talkFile;
    }

    public void setTalkFile(List<FileManage> talkFile) {
        this.talkFile = talkFile;
    }

    public String getJoinMember() {
        return joinMember;
    }

    public void setJoinMember(String joinMember) {
        this.joinMember = joinMember;
    }
}
